@tool
class_name BaseContextBehavior
extends Node2D

#region 属性
@export var context_behavior_type:GameEnum.ContextBehaviorType
@export var sensitive:float = 1
@export var is_debug:bool = false
var steering_component:SteeringComponent
var interest:Array[float] = []
var danger:Array[float] = []
var enable:bool = false:
	set(value):
		enable = value
#endregion
#region 字段
#endregion
#region 信号
#endregion

#region 基类方法
#endregion
#region 公共方法
func init_context(steering_component:SteeringComponent,resolution_radio:int):
	self.steering_component = steering_component
	interest = []
	danger = []
	interest.resize(resolution_radio)
	danger.resize(resolution_radio)
func get_interest(entity:CharacterEntity,directions:Array[Vector2]) -> Array[float]:
	interest = []
	interest.resize(directions.size())
	return interest
func get_danger(entity:CharacterEntity,directions:Array[Vector2]) -> Array[float]:
	danger = []
	danger.resize(directions.size())
	return danger
#endregion
#region 私有方法
#endregion
#region 生命周期函数
func  _process(delta: float) -> void:
	if is_debug:
		_draw()
func _draw() -> void:
	if not is_debug:
		return
#endregion
